public static GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
+ public static int OutlierBounds;
+
public SuperPolarity()
: base()
{
SuperPolarity.graphics = new GraphicsDeviceManager(this);
SuperPolarity.graphics.PreferMultiSampling = true;
Content.RootDirectory = "Content";
- ActorFactory.SetContentManager(Content);
+ ActorFactory.SetGame(this);
+ ParticleEffectFactory.SetGame(this);
+ ActorManager.SetGame(this);
}
/// <summary>
protected override void Initialize()
{
base.Initialize();
+
+ OutlierBounds = 100;
+
+ InputController.RegisterEventForButton("changePolarity", Buttons.A);
+ InputController.RegisterEventForKey("changePolarity", Keys.Z);
+
+ InputController.RegisterEventForButton("shoot", Buttons.X);
+ InputController.RegisterEventForKey("shoot", Keys.X);
}
/// <summary>
Vector2 playerPosition = new Vector2(GraphicsDevice.Viewport.TitleSafeArea.X, GraphicsDevice.Viewport.TitleSafeArea.Y + GraphicsDevice.Viewport.TitleSafeArea.Height / 2);
- ActorFactory.CreateMainShip(playerPosition);
+ Renderer.CheckIn(ActorFactory.CreateMainShip(playerPosition));
+ Renderer.CheckIn(ActorFactory.CreateShip(Ship.Polarity.Positive, new Vector2(200, 200)));
+ Renderer.CheckIn(ActorFactory.CreateShip(Ship.Polarity.Negative, new Vector2(400, 200)));
}
/// <summary>
spriteBatch.Begin();
- ActorManager.Draw(spriteBatch);
+ Renderer.Draw(spriteBatch);
spriteBatch.End();